package tinybase.pf;

public class PageNum {
	private int pageNum;
	
	public static PageNum PF_PAGE_LIST_END = new PageNum(-1);
	public static PageNum PF_PAGE_USED = new PageNum(-2);
	public static PageNum PF_PAGE_UNSET = new PageNum(-3);
	
	public PageNum() {
		this.pageNum = PF_PAGE_UNSET.getPageNum();
	}
	
	public PageNum(PageNum that) {
		this.pageNum = that.pageNum;
	}
	
	public PageNum(int pageNum) {
		this.pageNum= pageNum;
	}
	
	public int getPageNum() {
		return pageNum;
	}
	
	public void setPageNum(int value) {
		this.pageNum = value;
	}
	
	public void setPageNum(PageNum pageNum) {
		this.pageNum = pageNum.pageNum;
	}
	
	public void addOne() {
		this.pageNum++;
	}
	
	public boolean equals(Object p) {
		return this.pageNum == ((PageNum)p).pageNum;
	}
	
}
